package com.dao;

import java.util.Date;
import java.util.List;

import com.dbutil.DaoSupport;
import com.pojo.Admin;

public class AdminDao extends DaoSupport{
	

	public Admin checkAdmin( String name , String pwd ) {
		
		String sql_checkAdmin = "select * from admin where name = ? and pwd = ?";
		Object[] params = {name , pwd };
		
		List<Admin> admin  = executeQuery( sql_checkAdmin , Admin.class , params );
		
		if(admin !=null && admin.size()>0) {
			return admin.get(0);
		}else {
			return null;
		}
	}
}
